package com.xy.annotaion.handler.error;


import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * security filter 不归spring 管理！！！所以捕获不了
 *
 * @author Dell
 */
@RestControllerAdvice
public class TestExceptionHandler {


    @ExceptionHandler(Exception.class)
    public String exceptionHandle(Exception e) {
        e.printStackTrace();
        return e.getMessage();
    }

}
